<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
    <script type="text/javascript" src="/js/jquery-1.11.1.js"></script>
    <style>
        span{
            color: #1EABFF;
            padding: 0 5px;
        }
    </style>
</head>
<body>
    <form id="myForm">
        请输入登录账号:<input type="text" name="loginName" placeholder="请输入登录账号"><br>
        请输入登录密码:<input type="password" name="adminPwd" placeholder="请输入登录密码"> <br>
        <input type="button" id="btn" value="提交">
    </form>
</body>

    <script>
            $(function () {
                $("#btn").click(function () {
                    $.ajax({
                        type: "POST",
                        url: "/admin/list" , //RESTful风格的API定义
                        data: $("#myForm").serialize(),
                        success: function (vo) {
                            alert("进来了！")
                            if(vo.code==200){
                                alert("已经显示");
                                window.location.href="/pages/index.html";
                            }else{
                                alert("显示失败！"+vo.msg);
                            }
                        }
                    });
                });
            });
    </script>
</html>